/****************************** Module Header ******************************\
 * Module Name:  mxBoolean.cs
 * Module Version:  1.0.0 (2011-11-4)
 * Copyright (c) AnyEB.Com (14507247@qq.com)
 * 
 * This class is used to extension Boolean value's method.  It supplies 
 * useful extension methods, such as ParseToInteger().
 * 
 * This source is subject to the GPL License.
 * See http://www.gnu.org/licenses/gpl.html.
 * All other rights reserved.
 * 
 * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED 
 * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
\***************************************************************************/

using System;
using System.Collections.Generic;
using System.Text;

namespace UCL
{
    /// <summary>
    /// 布尔值数据扩展类
    /// <para>提供布尔值的扩展方法，如ParseToInteger()等</para>
    /// </summary>
    public static class mxBoolean
    {
        /// <summary>
        /// 转换成数值形式的值
        /// </summary>
        /// <param name="b"></param>
        /// <returns></returns>
        public static int ToInt(this bool b)
        {
            return b ? 1 : 0;
        }
    }
}
